import request from '@/utils/request'

// 查询会议室预订订单列表
export function listOrder(query) {
  return request({
    url: '/system/order/list',
    method: 'get',
    params: query
  })
}

// 查询会议室预订订单详细
export function getOrder(orderId) {
  return request({
    url: '/system/order/' + orderId,
    method: 'get'
  })
}

// 新增会议室预订订单
export function addOrder(data) {
  return request({
    url: '/system/order',
    method: 'post',
    data: data
  })
}

// 修改会议室预订订单
export function updateOrder(data) {
  return request({
    url: '/system/order',
    method: 'put',
    data: data
  })
}

// 删除会议室预订订单
export function delOrder(orderId) {
  return request({
    url: '/system/order/' + orderId,
    method: 'delete'
  })
}

// 支付会议室预订订单
export function payOrder(data) {
  return request({
    url: '/system/order/pay',
    method: 'post',
    data: data
  })
}

// 会议室订单取消
export function cancleOrder(data) {
  return request({
    url: '/system/order/cancel',
    method: 'post',
    data: data
  })
}


// Body:{
//   "cancellationId":"9"
//   }
// 用户二次确认取消订单
export function confirmCancelOrder(data) {
  return request({
    url: '/system/cancelOrder/confirm',
    method: 'post',
    data: data
  })
}



